<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head lang="en">
    <meta charset="utf-8"/>
    <title>order</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/public.css"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/proList.css"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/mygxin.css"/>
    <style >
        .paybutton{
            display: inline-block;
            width: 100%;
            height: 40px;
            text-align: center;
            line-height: 40px;
            background: #c10000;
            color: #fff;
        }
        .msg{
            color: red;

        }
    </style>
</head>
<body><!----------------------------------------order------------------>
<div class="head ding">
    <div class="wrapper clearfix">
        <div class="clearfix" id="top"><h1 class="fl"><a href="index.html"><img src="${pageContext.request.contextPath}/img/logo.png"/></a></h1>
            <div class="fr clearfix" id="top1"><p class="fl"><a href="#" id="login">登录</a><a href="#" id="reg">注册</a>
            </p>
                <div class="btn fl clearfix"><a href="mygxin.html"><img src="${pageContext.request.contextPath}/img/grzx.png"/></a><a href="#" class="er1"><img
                        src="img/ewm.png"/></a><a href="cart.html"><img src="${pageContext.request.contextPath}/img/gwc.png"/></a>
                    <p><a href="#"><img src="${pageContext.request.contextPath}/img/smewm.png"/></a></p></div>
            </div>
        </div>
        <ul class="clearfix" id="bott">
            <li><a href="/index">首页</a></li>

        </ul>
    </div>
</div>
<div class="msg">${msg}</div>
<div class="order cart mt"><!-----------------site------------------->
    <div class="site"><p class="wrapper clearfix"><span class="fl">订单确认</span><img class="top"
                                                                                   src="${pageContext.request.contextPath}/img/temp/cartTop02.png"></p>
    </div><!-----------------orderCon------------------->
    <div class="orderCon wrapper clearfix">
        <div class="orderL fl"><!--------h3----------------><h3>收件信息</h3>
            <!--------addres---------------->
            <div class="addres clearfix">
                <c:forEach items="${addresseslist}" var="address">
                    <div class="addre fl on addresschrock">
                        <div class="tit clearfix"><p class="fl">${address.addressConsignee} </p>
                        </div>
                        <div class="addCon"><p>${address.addressProvince}${address.addressCity}${address.addressCounty}${address.addressProfile}</p>
                            <p>${address.addressPhonenumber}</p></div>
                    </div>
                </c:forEach>
            </div>


        </div>
        <div class="orderR fr">
            <div class="msg"><h3>订单内容<a href="/user/orderlist" class="fr">返回购物车</a></h3><!--------ul---------------->
                    <ul class="clearfix">
                        <li class="fl"><img width="100" height="100" src="${product.productPicture}"></li>
                        <li class="fl"><p>${product.productName}</p>
                            <p>数量：${sumProduct}</p></li>
                        <li class="fr">￥${sumOrders}</li>
                    </ul>

            </div><!--------tips---------------->
            <div class="tips"><p><span class="fl">商品金额：</span><span class="fr">￥${sumOrders}</span></p>

                <p><span class="fl">运费：</span><span class="fr">免运费</span></p></div><!--------tips count---------------->
            <div class="count tips"><p><span class="fl">合计：</span><span class="fr">￥${sumOrders}</span></p></div>
            <form action="/user/orders" method="post">
                <h3>支付方式</h3><!--------way---------------->
                <div class="way clearfix"><select name="paychose">
                    <c:forEach items="${paymentList}" var="pay">
                        <option value="${pay.paymentName}">${pay.paymentName}</option>
                    </c:forEach>
                </select>
                    <br> <br> <br>
                    <input style="display: none" name="addressId" Id="addressId">
                </div>
                <input type="submit"  value="去支付" class="paybutton">
            </form>
        </div>
    </div>
</div><!--编辑弹框--><!--遮罩-->

<!--返回顶部-->
<div class="gotop"><a href="/user/orderlist">
    <dl>
        <dt><img src="${pageContext.request.contextPath}/img/gt1.png"/></dt>
        <dd>去购<br/>物车</dd>
    </dl>
</a><a href="#" class="dh">
    <dl>
        <dt><img src="${pageContext.request.contextPath}/img/gt2.png"/></dt>
        <dd>联系<br/>客服</dd>
    </dl>
</a><a href="/user/userInformation">
    <dl>
        <dt><img src="${pageContext.request.contextPath}/img/gt3.png"/></dt>
        <dd>个人<br/>中心</dd>
    </dl>
</a><a href="#" class="toptop" style="display: none;">
    <dl>
        <dt><img src="${pageContext.request.contextPath}/img/gt4.png"/></dt>
        <dd>返回<br/>顶部</dd>
    </dl>
</a>
    <p>400-800-8200</p></div><!--footer-->
<div class="footer">
    <div class="top">
        <div class="wrapper">
            <div class="clearfix"><a href="#2" class="fl"><img src="${pageContext.request.contextPath}/img/foot1.png"/></a><span class="fl">7天无理由退货</span>
            </div>
            <div class="clearfix"><a href="#2" class="fl"><img src="${pageContext.request.contextPath}/img/foot2.png"/></a><span class="fl">15天免费换货</span>
            </div>
            <div class="clearfix"><a href="#2" class="fl"><img src="${pageContext.request.contextPath}/img/foot3.png"/></a><span class="fl">满599包邮</span>
            </div>
            <div class="clearfix"><a href="#2" class="fl"><img src="${pageContext.request.contextPath}/img/foot4.png"/></a><span class="fl">手机特色服务</span>
            </div>
        </div>
    </div>
    <p class="dibu">二手物品&copy;2013-2017公司版权所有 京ICP备080100-44备0000111000号<br/>
        违法和不良信息举报电话：188-0130-1238，本网站所列数据，除特殊说明，所有数据均出自我司实验室测试</p></div>
<script src="${pageContext.request.contextPath}/js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
<script src="${pageContext.request.contextPath}/js/public.js" type="text/javascript" charset="utf-8"></script>
<script src="${pageContext.request.contextPath}/js/pro.js" type="text/javascript" charset="utf-8"></script>
<script src="${pageContext.request.contextPath}/js/user.js" type="text/javascript" charset="utf-8"></script>
<script>
    var obt=document.getElementsByClassName("addresschrock");
    for (var i = 0; i < obt.length; i++) {
        (function(i) {
            obt[i].onclick = function() {
                var c=document.getElementById("addressId");
                c.value=i;
            }
        })(i)
    }
</script>
</body>
</html>